home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-23 | 4.7 KB | 202 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLBufSin.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * File: SLBufSin.idl
- *
- * Contains: Interface for abstract random access sink class
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- */
-
-
- #ifndef SOM_FW_OBufferedSink_xh
- #define SOM_FW_OBufferedSink_xh
-
- class FW_OBufferedSink;
-
- #define FW_OBufferedSink_MajorVersion 1
- #define FW_OBufferedSink_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_FW_ORandomAccessSink_xh
- #include <SLRanSin.xh>
- #endif
-
- #ifndef FW_OBufferedSink_API
- #define FW_OBufferedSink_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_OSink;
- class FW_ORandomAccessSink;
- class FW_OBufferedSink;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OBufferedSinkCClassData FW_OBufferedSinkClassData
- #define FW_OBufferedSinkNewClass(major,minor) somNewVersionedClassReference(FW_OBufferedSink,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OBufferedSinkMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OBufferedSink class object, and the methods it introduces. */
- SOMEXTERN struct FW_OBufferedSinkClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken InitFromSink;
- somMToken GetORandomAccessSink;
- somMToken Flush;
- } SOMDLINK FW_OBufferedSinkClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OBufferedSink_Class_Source) && !defined(SOM_Module_slbufsin_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OBufferedSinkClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OBufferedSink Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_FW_OBufferedSink_InitFromSink)(FW_OBufferedSink *somSelf, Environment *ev,
- FW_ORandomAccessSink* aSink,
- long bufferCapacity);
- typedef FW_ORandomAccessSink* (* SOMLINK somTD_FW_OBufferedSink_GetORandomAccessSink)(FW_OBufferedSink *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OBufferedSink_Flush)(FW_OBufferedSink *somSelf, Environment *ev);
- }
-
- #endif /* FW_OBufferedSink_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OBufferedSink
- */
- class FW_OBufferedSink : public FW_ORandomAccessSink
- {
- public:
-
- // FW_OBufferedSink::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OBufferedSink, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OBufferedSink);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OBufferedSink);
- #endif
- }
-
- // FW_OBufferedSink::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitFromSink */
- void InitFromSink(Environment *ev,
- FW_ORandomAccessSink* aSink,
- long bufferCapacity)
- {
- SOM_ResolveD(this,FW_OBufferedSink,FW_OBufferedSink,InitFromSink)
- (this,ev,aSink,bufferCapacity);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetORandomAccessSink */
- FW_ORandomAccessSink* GetORandomAccessSink(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- FW_ORandomAccessSink* __somResult =
- SOM_ResolveD(this,FW_OBufferedSink,FW_OBufferedSink,GetORandomAccessSink)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OBufferedSink,FW_OBufferedSink,GetORandomAccessSink)
- (this,ev);
- #endif
- }
-
- /* method: Flush */
- void Flush(Environment *ev)
- {
- SOM_ResolveD(this,FW_OBufferedSink,FW_OBufferedSink,Flush)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* FW_OBufferedSink */
-
-
-
- #endif /* SOM_FW_OBufferedSink_xh */
-